#include "Time.h"

Time::Time()
{
	m_milliSeconds = 0;
	m_timeSinceLast = 0;
}

Time::~Time()
{
}

float& Time::getMilliSecondsElapsed()
{
	return (float)m_timeSinceLast;
}

float Time::getSecondsElapsed()
{
	return (float)m_timeSinceLast/1000.0f;
}

float Time::getMinutesElapsed()
{
	return (float)m_timeSinceLast/60000.0f;
}

float& Time::getMilliSecondsSinceStart()
{
	return (float)m_milliSeconds;
}

float Time::getSecondsSinceStart()
{
	return (float)m_milliSeconds/1000.0f;
}

float Time::getMinutesSinceStart()
{
	return (float)m_milliSeconds/60000.0f;
}

void Time::setTime( float seconds )
{
	m_timeSinceLast = seconds - m_milliSeconds;
	m_milliSeconds = seconds;
}

float Time::operator- ( const Time& time )
{
	return (float)(m_milliSeconds - time.m_milliSeconds);
}